<template>
  <div>
    <h1>展示的内容:{{msg}}</h1>
    <input type="text" v-model="inputzhi" @keyup.enter="fn">
  </div>
</template>

<script>
export default {
data(){
  return{
    msg:'',
    inputzhi:'',
  }
},
methods:{
fn(){
  this.msg=this.inputzhi
  this.inputzhi=''
}
}
}
</script>

<style>

</style>